<?php
namespace Lh\server;

use Lh\Exception\ValidateException;

class Validate{
    public static function make(){
        if($_SERVER['REQUEST_METHOD'] == 'POST'){
            if(empty($_POST['username'])){
                throw new ValidateException('名字不能为空');
            }elseif (empty($_POST['password'])){
                throw new ValidateException('密码不能为空');
            }
        }
    }
}